﻿using System;
using System.Threading;
using System.Windows.Forms;
using Slippor.Douban.Radio.Assist;

namespace Slippor.Douban.Radio
{
    internal static class Program
    {
        private static Main mainForm;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            AppDomain.CurrentDomain.AppendPrivatePath("Plugin");
            bool isFirst;
            using (new Mutex(true, Application.ProductName,  out isFirst))
            {
                if (isFirst)
                {
                    mainForm = new Main();
                    Application.Run(mainForm);
                }
            }
        }
    }
}